package com.hfy.user.mapper;

import com.hfy.model.dto.UpdateDto;
import com.hfy.model.po.user.UserCommentPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @ author 韩
 * time: 2024/5/20 2:20
 */
@Mapper
public interface InfoMapper {
    @Update("UPDATE `user` SET username=#{ username },password=#{ password },avatar=#{avatar} " +
            "WHERE account=#{ account }")
    void updateByAccount(UpdateDto dto);

    @Select("SELECT avatar, username FROM `user` WHERE `account` = #{ account }")
    UserCommentPo getInfoByAccount(Long account);

//    @Select("SELECT * FROM `user` WHERE `account` = #{ account }")
//    UserPo selectByAccount(Long account);


}
